package com.example.academic_affairs_system.model.dto.clazz;

import cn.hutool.core.date.LocalDateTimeUtil;
import com.example.academic_affairs_system.model.entity.AasClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 新建班级所需要的信息
 *
 * @author hjx
 * @since 2023/02/03 5:45 PM
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("新建班级所需要的信息")
public class HandlerClassDTO {
  @ApiModelProperty("班级 id")
  private Long classId;

  @ApiModelProperty("负责人用户 id")
  private Long directorsUserId;

  @ApiModelProperty("班级的编码")
  private Long classCode;

  @ApiModelProperty("班级名称")
  private String name;

  @ApiModelProperty("班级描述")
  private String desc;

  @ApiModelProperty("班级性质")
  private String type;

  public AasClass buildCreateClass() {
    return AasClass.builder()
        .id(classId)
        .directorsUserId(directorsUserId)
        .desc(desc)
        .classCode(classCode)
        .name(name)
        .type(type)
        .build();
  }
}
